Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adjust system mode behavior for Acova (Zehnder) heaters #256

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from

Conversation

gdoffe
Copy link

@gdoffe gdoffe commented Oct 21, 2024

This PR addresses an issue where SystemMode.AUTO for Acova (Zehnder) heaters behaves differently from the HA standard. For this manufacturer, SystemMode.AUTO allows control of the heater via Zigbee, while SystemMode.HEAT puts the heater in manual mode.

As a result, the conversion tables in ZHA climate constants (HVACMode) are incorrect for this device. The mapping for SystemMode.AUTO has been updated to correspond to HVACMode.HEAT instead of HVACMode.HEAT_COOL.

See zigpy/zha-device-handlers#2921

Copy link

codecov bot commented Oct 21, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.59%. Comparing base (d6bb4a8) to head (e978f41).
Report is 5 commits behind head on dev.

Additional details and impacted files
@@           Coverage Diff           @@
##              dev     #256   +/-   ##
=======================================
  Coverage   96.58%   96.59%           
=======================================
  Files          61       61           
  Lines        9526     9550   +24     
=======================================
+ Hits         9201     9225   +24     
  Misses        325      325           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@gdoffe gdoffe force-pushed the add_acova_heaters branch 8 times, most recently from d09b59f to 08d6e62 Compare October 28, 2024 01:40
@gdoffe gdoffe force-pushed the add_acova_heaters branch from 08d6e62 to f54d13d Compare October 30, 2024 16:22
@@ -589,6 +589,67 @@ class ZenWithinThermostat(Thermostat):
"""Zen Within Thermostat implementation."""


@MULTI_MATCH(
cluster_handler_names=CLUSTER_HANDLER_THERMOSTAT,
manufacturers={"ZEHNDER GROUP VAUX ANDIGNY "},

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi,
I just tested this branch on my Home Assistant.

Personally, my heater's manufacturer name does not include the trailing spaces. Maybe I have a more recent version, and ZEHNDER has fixed this typo?

I believe both manufacturer names, "ZEHNDER GROUP VAUX ANDIGNY " and "ZEHNDER GROUP VAUX ANDIGNY", exist on the market.

Therefore, I propose a PR to @gdoffe repository to allow support for both manufacturer names. I hope it will be accepted and reflected in this PR :)

Otherwise, I tested it on my side (with this minor change), and it works very well. The modes are correctly mapped thanks to @gdoffe work.

@TheJulianJES TheJulianJES added the entities Issue or PR about (custom) entities label Nov 24, 2024
@gdoffe gdoffe force-pushed the add_acova_heaters branch 2 times, most recently from 0f11292 to 6b4b750 Compare November 29, 2024 12:07
@gdoffe
Copy link
Author

gdoffe commented Nov 29, 2024

Thanks to @mattheop for its review and fixes, it is squashed and pushed.

@gdoffe gdoffe requested a review from puddly November 30, 2024 21:49
@gdoffe
Copy link
Author

gdoffe commented Dec 4, 2024

@puddly does it seem ok for you ?

Just tell me if I need to do other modifications. 🙏

@bterrier
Copy link

bterrier commented Feb 4, 2025

Anything left to do before this gets merged?
I would be happy to also test on my home assistant if someone points to me where to find docs for manually changing zha version in home assistant

@gdoffe gdoffe force-pushed the add_acova_heaters branch from 8c57023 to 6f3d92d Compare February 8, 2025 00:55
@gdoffe
Copy link
Author

gdoffe commented Feb 8, 2025

Anything left to do before this gets merged?

Not really, waiting for merge...

I just made a very small "fix" to not display current temperature as it is just equal to the temperature order.
image

@gdoffe gdoffe force-pushed the add_acova_heaters branch 2 times, most recently from 6c67fe9 to e978f41 Compare February 8, 2025 01:01
gdoffe and others added 2 commits February 8, 2025 02:02
This commit addresses an issue where SystemMode.AUTO for Acova (Zehnder)
heaters behaves differently from the HA standard. For this manufacturer,
SystemMode.AUTO allows control of the heater via Zigbee, while
SystemMode.HEAT puts the heater in manual mode.

As a result, the conversion tables in ZHA climate constants (HVACMode)
are incorrect for this device. The mapping for SystemMode.AUTO has been
updated to correspond to HVACMode.HEAT instead of HVACMode.HEAT_COOL.

Signed-off-by: Gilles DOFFE <g.doffe@gmail.com>
Co-authored-by: Matthéo PERELLE <mattheo.perelle@gmail.com>
Signed-off-by: Gilles DOFFE <g.doffe@gmail.com>
Co-authored-by: Matthéo PERELLE <mattheo.perelle@gmail.com>
@guillerelax
Copy link

cool, i would like to test this branch in my ha, but same that bterrier, i don't know how i can change ZHA version

@mattheop
Copy link

mattheop commented Feb 23, 2025

Hi,

It's frustrating that this branch hasn't been merged yet, even though it seems to interest many people.

Here’s how you can use this branch in your local installation (i am using HA OS but i think you can easily adapt for other instalation type).

⚠ Disclaimer: THIS IS NOT A PERMANENT SOLUTION AND SHOULD ONLY BE USED TEMPORARILY. You will no longer be synced with the latest ZHA versions. Once this branch is merged, you will need to revert the following changes.

You will need to override the ZHA core component. I will try my best to help you with following instructions
Make sure your HA instance is up to date to avoid version conflicts.

Steps

  1. Ensure you have SSH access to your HA instance.

    • You can install it using the official "Terminal & SSH" add-on from the store.
  2. Open the SSH console:

    • Go to Settings > Add-ons > Terminal & SSH and click "OPEN WEB UI" to access the web-based SSH terminal.
  3. Clone the core repository to retrieve the ZHA component.
    Since the core repository is HUGE, we will perform a sparse checkout to retrieve only the necessary files.

    • Clone the repository:
      git clone -n --depth=1 --filter=tree:0 https://github.com/home-assistant/core.git ~/_core
    • Navigate to the cloned repository:
      cd ~/_core
    • Select only the required folder:
      git sparse-checkout set --no-cone homeassistant/components/zha
    • Fetch latest available version tag (currently 2025.2.5):
      git fetch origin tag 2025.2.5 --depth=1
    • Checkout the fetched tag
      git checkout tags/2025.2.5
  4. Copy the ZHA component from the cloned repository to custom_components:

    cp -r ~/_core/homeassistant/components/zha/ ~/homeassistant/custom_components/zha
  5. Modify manifest.json:

    nano ~/homeassistant/custom_components/zha/manifest.json

    note for ones whos not familiar with linux: move with arrows, save with crtl+s followed by ctrl+x

    • Add a "version" property (bc core components does not require this, but as you write a custom components, this one is mandatory):

      "version": "1.0",

      (Place this just before "domain")

    • Replace the "requirements" preoperty to point to this PR branch:

      "requirements": ["git+https://github.com/gdoffe/zha.git@add_acova_heaters#egg=zha"],

    Your manifest.json should look something like this:

    {
      "version": "1.0",
      "domain": "zha",
      ... other fields ...
      "requirements": ["git+https://github.com/gdoffe/zha.git@add_acova_heaters#egg=zha"],
      ... other fields ...
    }
  6. Restart Home Assistant.: Do not use "Quick reload", perform a full restart.

  7. Verify the integration.

    • Go to Settings > Devices & Services > Zigbee Home Automation
    • You should see a message indicating that this is a Custom integration replacing a core component.

If everything is set up correctly, your previously buggy thermostat widget should now function properly and match the latest changes shared by @gdoffe.

Let me know if you encounter any issues.

FYI: @bterrier @guillerelax

edit: sorry for previous deleted post, i miss some instructions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
entities Issue or PR about (custom) entities
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants